package Day9;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in  = new Scanner(System.in);

        while (in.hasNextLine()) {
            String s = in.nextLine();
            String[] ss = s.split(" ");

            int n = Integer.parseInt(ss[0]);
            int m = Integer.parseInt(ss[1]);

            System.out.print(getPlans(n,m));
        }
    }

    /**
     * 获取方案数
     * @param m 当前结点还能走几步
     * @param n 当前结点还能走几步
     * @return 方案数
     */
    public static int getPlans (int m, int n) {
        if (m == 0 || n == 0) {
            return 1;
        }
        return getPlans(m - 1, n) + getPlans(m, n - 1);
    }

    public int addAB(int A, int B) {
        if (A == 0) {
            return B;
        } else if (B == 0) {
            return A;
        } else {
            return addAB(A^B, (A&B) << 1);
        }
    }

}